#ifndef SIMULATOR_H
#define SIMULATOR_H
#include <QLinkedList>

class Arrival;
class Server;

class SimulationResult;

class Simulator
{
    friend class SimulationResult;
public:
    Simulator(Arrival* arrival, Server* server, double time);
    SimulationResult Run();


private:
    double end;
    Arrival* arrival;
    Server* server;

    class Event
    {
    public:
        enum Type {In, Out};
        Type type;
        double time;

    };

};

class SimulationResult
{
public:
    SimulationResult(QLinkedList<Simulator::Event>& data, double time);
    double ELq();
    double EWq();
private:
    QLinkedList<Simulator::Event> data;
    double time;
};


#endif // SIMULATOR_H
